<h1>[#h1] -> should be 1</h1>
<h1>[#h1] -> should be 2</h1>
<h1>[#h1] -> should be 3</h1>

	<h2>[#h2] -> should be 3.1</h2>
		<h3>[#h3] -> should be 3.1.1</h3>
		<h3>[#h3] -> should be 3.1.2</h3>
	
		<p>[#fig] should be fig 1</p>
		<p>[#fig] should be fig 2</p>
	
		<p>[#tab] should be table 1</p>
	
	<h2>[#h2] -> should be 3.2</h2>

<h1>[#h1] -> should be 4</h1>

	<h2>[#h2] -> should be 4.1</h2>
		<h3>[#h3] -> should be 4.1.1</h3>
			<h4>[#h4] -> should be 4.1.1.1</h4>
			<h4>[#h4] -> should be 4.1.1.2</h4>
			
				<p>[#tab] should be table 2</p>

<h1>[#h1] -> should be 5</h1>

<p>[#tab] should be table 3</p>
<p>[#fig] should be fig 3</p>